Telephone dialers have been used to simplify dialing operations or to allow for more economic use of carrier options. Three examples of telephone dialers are illustrated in FIGS. 1A–C. In FIG. 1A, a dialer 20 is coupled in parallel with a telephone 22. The dialer 20 includes a keypad which enables a user to program dialing sequences to be applied to the telephone network 24 when the user enters some short code on the keypad. For example, to place a call, the user may take the handset off hook, apply a three digit code to the keypad of dialer 20, and wait for the dialer to generate a full dialing sequence to complete the call to the network. Series dialers are coupled between one or more telephones and the network, as illustrated in FIG. 1B. The user takes the handset off hook and dials a sequence through the telephone keypad. Some DTMF digits may not be sent to the telephone network; and in that case the relay 25 is open. The series dialer detects the code input by the user through a DTMF and off-hook detector 26 that supplies power to the telephones when they are not connected to the network, processes that code to select a dialing sequence, if any, and when appropriate applies that sequence to the network through a DTMF and off-hook generator 30. The processor 28 may then open the direct connection from the handset 22 to the network. Parallel dialers such as illustrated in FIG. 1C can be anywhere on a line in parallel with many telephones. An example of such a parallel dialer is presented in U.S. Pat. No. 5,898,756. In that system, the user enters a code on the handset keypad as with the series dialer, and that code is detected through a DTMF, off-hook and ring detector 32 and processed by a processor 34. The processor generates the dialing sequence and applies it to the network through a DTMF generator 36. Because the telephones 22 are coupled directly to the network, the processor 34 applies an AC a load 38 to the line while the codes are entered into the telephone in order to prevent the network from responding directly to those codes. The load is then removed to enable the appropriate dialing sequence to be applied to the network and to allow for voice and data communications thereafter.
An advanced function of dialers is to store a dialed sequence before it is forwarded on to the network and to determine from the sequence a preferred long distance carrier. To direct the call to that carrier, an additional sequence is prepended to the dialed numbers. For example, in the United States, a domestic long distance call is initiated by a user dialing a prefix of 1 followed by the area code, an exchange typically associated with a local telephone switching center and a four digit subscriber number. The user can at the time of dialing designate a long distance carrier to handle the call. To that end, the call sequence is typically prefixed by 1010, rather than 1, followed by a number associated with the long distance carrier, followed by the area code, exchange and subscriber number. A dialer may store a dialed number, process the number to determine an appropriate long distance carrier and insert the 1010 and carrier code into the sequence before forwarding it to the telephone network through a DTMF generator. Similarly, an international long distance call is typically initiated by a user dialing a prefix of 011 followed by the country code, city code and the desired party's domestic phone number. A dialer may select an appropriate carrier and insert the appropriate dialing sequence depending, for example, on the country to which the call is directed. For example, a carrier known to have the best rates to a particular destination at a particular time can be selected.
Thus, it is advantageous for a dialer's behavior to be governed by a prefix of the dialed phone number, such as 1 or 011, and perhaps additional digits following the prefix such as an area code. Sometimes a very short prefix may determine behavior, such as an 0 followed by a digit other than 0 or 1. Other times a very long sequence may determine behavior, such as 1 followed by the area code followed by the 3 digit local exchange or 011 followed by a country code that typically varies from 1 to 3 digits. Thus it is advantageous to respond to sequences that vary in length. A fast and easy way to deal with these variable length sequences is to form a memory address for all possible combinations of numbers formed by the maximum number of digits (0000000 through 9999999 for 7 digits, for instance), and to store in each address the routing information to be generated, such as “1010345.” This simple approach has the disadvantage of consuming very large amounts of memory. Another disadvantage is that loading this large memory one location at a time would be very time-consuming.